The state of execution is dynamically recorded in the state indicator. The state indicator identifies the chain of execution for operators, functions and the evaluated or character input/output system variables (⎕ and ⍞). At the top of the state indicator is the most recently activated operation.
Execution may be suspended by an interrupt, induced by the user, the system, or by a signal induced by the system function ⎕SIGNAL or by a stop control set by the system function ⎕STOP. If the interrupt (or event which caused the interrupt) is not defined as a trappable event by the system variable ⎕TRAP, the state indicator is cut back to the first of either a defined operation or the evaluated input prompt (⎕) such that there is no locked defined operation in the state indicator. The topmost operation left in the state indicator is said to be SUSPENDED. Other operations in the chain of execution are said to be PENDENT.
The state indicator may be examined when execution is suspended by the system commands )SI and )SINL. The names of the defined operations in the state indicator are given by the system functions ⎕SI and ⎕XSI while the line numbers at which they are suspended or pendent is given by the system variable ⎕LC.
Suspended execution may be resumed by use of the Branch function (see Branch). Whilst execution is suspended, it is permitted to enter any APL expression for evaluation, thereby adding to the existing state indicator. Therefore, there may be more than one LEVEL OF SUSPENSION in the state indicator. If the state indicator is cut back when execution is suspended, it is cut back no further than the prior level of suspension (if any).
∇ F [1] G ∇ ∇ G [1] 'FUNCTION G'+ ∇ ⍎'F' SYNTAX ERROR G[1] 'FUNCTION G'+ ^ )SI #.G[1]* #.F[1] ⍎
⎕LOCK'G' ⍎'F' SYNTAX ERROR F[1] G ^ )SI #.F[1]* ⍎ #.G[1]* #.F[1] ⍎
A suspended or pendent operation may be edited by the system editor or redefined using ⎕FX provided that it is visible and unlocked. However, pendent operations retain their original definition until they complete, or are cleared from the state indicator. When a new definition is applied, the state indicator is repaired if necessary to reflect changes to the operations, model syntax, local names, or labels.